<template>
	<view class="newsDetail">
		<view class="news-title">
			{{detail.title}}
		</view>
		
		<view class="news-content">
			<view  v-html="detail.content"></view>
		</view>
	</view>
</template>

<script setup>
	import {
		onShow,
		onLoad
	} from "@dcloudio/uni-app"
	import {ref} from 'vue'
	import util from '../../util/index.js'
	const detail = ref({})
	onLoad((query) => {
		console.log('query.itemStr',query.item)
		const id = query.id
		uni.request({
			url:util.baseUrl + '/adminapi/news/list/' + id,
			success:(res) => {
				console.log('success')
				detail.value =res.data.data
			}
		})
	})
</script>

<style lang="scss">
	.newsDetail {
		padding: 20rpx;
		background-color: #fff;
		.news-title {
			font-size: 34rpx;
			font-weight: 700;
			text-align: center;
			margin-bottom: 20rpx;
		}
	}
</style>